﻿Public Class Card
    Private cardID As Integer
    Private cardSystemIDpassed As ArrayList
    Private cardCategoryID As Integer
    Private cardName As String
    Private cardInstruction As String
    Private cardDesc As String

    Public Sub New()
        cardID = 0
        cardCategoryID = 0
        cardName = ""
        cardInstruction = ""
        cardDesc = ""
    End Sub

    Public Sub New(ByVal cID As Integer, ByVal ccID As Integer, ByRef cName As String, ByRef cInstruct As String, ByRef cDesc As String)
        cardID = cID
        cardCategoryID = ccID
        cardName = cName
        cardInstruction = cInstruct
        cardDesc = cDesc
    End Sub

    Public Property ID() As Integer
        Get
            Return cardID
        End Get
        Set(ByVal value As Integer)
            cardID = value
        End Set
    End Property

    Public Property CategoryID() As Integer
        Get
            Return cardCategoryID
        End Get
        Set(ByVal value As Integer)
            cardCategoryID = value
        End Set
    End Property


    Public Property Name() As String
        Get
            Return cardName
        End Get
        Set(ByVal value As String)
            cardName = value
        End Set
    End Property

    Public Property Instruction() As String
        Get
            Return cardInstruction
        End Get
        Set(value As String)
            cardInstruction = value
        End Set
    End Property

    Public Property Description() As String
        Get
            Return cardDesc
        End Get
        Set(value As String)
            cardDesc = value
        End Set
    End Property

    Public Property cardSystemID() As ArrayList
        Get
            Return cardSystemIDpassed
        End Get
        Set(value As ArrayList)
            cardSystemIDpassed = value
        End Set
    End Property

    Public Sub addCardSystemID(ByVal id As Integer)
        cardSystemIDpassed.Add(id)
    End Sub

    Public Overrides Function ToString() As String
        Dim s As String = ""

        s = "ID: " & cardID & "<br />Name: " & cardName & "<br />CategoryID: " & cardCategoryID & "<br />Instruction: " & cardInstruction & "<br />Description: " & cardDesc

        Return s
    End Function

End Class
